Heap profiling (memory profiling) enables you to understand the memory allocation and garbage collection behavior of your applications over time. It helps you identify method calls in the context within which most memory was allocated and combine this information with the number of allocated objects. The Survivor perspective helps you to understand the context within which your long-living objects (objects that survive multiple garbage collection cycles) are created.
Go to Configurations > Actions > Memory Profiling, the Memory Profiling window is displayed
![](https://docs.cavisson.com/wp-content/uploads/2023/02/Figure-109-Memory-Profiling-1024x403.png)
2. Click the Add New Session button , and the Topology Details window is displayed.
![](https://docs.cavisson.com/wp-content/uploads/2023/02/Figure-110-Topology-Details-Window-1024x362.png)
3. Navigate to the instance via the Topology tree and click the Memory Profiling The Memory Profiling Session Configuration window is displayed.
4. Provide the following configuration details:
General Setting
In General Settings, there are following fields which are listed below:
![](https://docs.cavisson.com/wp-content/uploads/2023/02/Figure-111-Memory-Profiling-Session-Configuration-Window.png)
- Session Name: Name of the heap profiling session.
- Duration: Total duration of the session in minutes. Default – 30 minutes, Minimum – 5 minutes, and Maximum – 120 minutes.
- of Top Class to Capture: Top number of classes having bigger size and count. Default – 20, Minimum – 5, and Maximum – 100.
- Profiling Type: The options are – Object Count, Object Duration, or both.
- Description: Description of the heap profiling session.
Advanced Setting
![](https://docs.cavisson.com/wp-content/uploads/2023/02/Figure-112-Advance-Settings.png)
- Frequency (in Secs): Number of sessions to be executed per minute. Low (10 sessions/minute), Medium (20 sessions/minute), or High (30 sessions/minute). You can also choose any intermediary values (sessions/minute).
- TopNClass Find Duration (% of total session time): Time of pass 1 from the total duration (% of total session time) in seconds. Default – 30%, Minimum – 10%, Maximum – 50%.
- Maximum number of unique allocations to track: Total stack trace during the session. Default – 1000, Minimum – 100, Maximum – 10000.
- No of Lines/Stack Trace: Depth of the stack trace. Default – 20, Minimum – 5, Maximum – 200.
- Blacklist Classes: Classes to instrument during instrumenting object constructor.
- Whitelist Classes: Classes to instrument during instrumenting object constructor.
After the configuration, when you click the Start button, a new session of Memory Profiling starts. You can view all the sessions in the Memory Profiling window.
Note:
- When any memory profiling session is started, a running icon is displayed, which denotes the session is running for Mutex lock.
- You can delete a session by clicking the
button.
![](https://docs.cavisson.com/wp-content/uploads/2023/02/Figure-113.png)
5. This window displays the following details:
- New Memory Allocation
- Memory Leaks
New Memory Allocation
Class Data
![](https://docs.cavisson.com/wp-content/uploads/2023/02/Figure-114-Class-Data-1024x374.png)
Statistics
![](https://docs.cavisson.com/wp-content/uploads/2023/02/Figure-115-Statistics.png)
Memory Leaks
Class Data
![](https://docs.cavisson.com/wp-content/uploads/2023/02/Figure-116-Class-Data.png)
Statistics
![](https://docs.cavisson.com/wp-content/uploads/2023/02/Figure-117-Statistics.png)